package com.joysuch.wwyt.risk.repository;

import com.joysuch.wwyt.risk.entity.RiskStableEvalution;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;

public interface RiskStableEvalutionDao extends JpaRepository<RiskStableEvalution, Long> {

    @Query(value = "SELECT * FROM wwyt_risk_district_stable_evalution  WHERE RISK_EVALUTION_ID= ?1", nativeQuery = true)
    public Long findIdByEvaId(Long id);
/*
    @Modifying
    @Query(value = "update RiskStableEvalution re set re.riskDistrictId = :#{bean.riskDistrictId},re.riskEvalutionId= :#{bean.riskEvalutionId}," +
            "re.areaCategory= :#{bean.areaCategory},re.chemicalCategory= :#{bean.chemicalCategory},re.processAndChemical= :#{bean.processAndChemical}," +
            "re.processPressure= :#{bean.processPressure},re.processTemperature= :#{bean.processTemperature},re.accident= :#{bean.accident},re.peopleTotalNumber= :#{bean.peopleTotalNumber}," +
            "re.areaMaxNumber= :#{bean.areaMaxNumber},re.enterpriseMaxNumber= :#{bean.enterpriseMaxNumber},re.maxLevel= :#{bean.maxLevel},re.scope= :#{bean.scope}," +
            "re.riskLevel= :#{bean.riskLevel}")
    public int update(RiskStableEvalution bean);*/

}
